﻿Public Class frmReplaceText

    Public Sub New(ByVal find As String, ByVal replace As String)

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        txtFind.Text = find
        txtReplace.Text = replace
    End Sub

    Private Sub btnOK_Click(sender As System.Object, e As System.EventArgs) Handles btnOK.Click
        _type = ogrpTextType.SelectedIndex
        _find = txtFind.Text
        _replace = txtReplace.Text

        Me.DialogResult = Windows.Forms.DialogResult.OK
        Me.Dispose()
    End Sub

    Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
        Me.DialogResult = Windows.Forms.DialogResult.Cancel
        Me.Dispose()
    End Sub

    Private _type As Integer
    Public ReadOnly Property Type() As Integer
        Get
            Return _type
        End Get
    End Property

    Private _find As String
    Public ReadOnly Property Find() As String
        Get
            Return _find
        End Get
    End Property

    Private _replace As String
    Public ReadOnly Property Replace() As String
        Get
            Return _replace
        End Get
    End Property
End Class